package com.zzyl.serve.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzyl.serve.domain.NursingElder;
import com.zzyl.serve.mapper.NursingElderMapper;
import com.zzyl.serve.service.INursingElderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @Author mr.wu
 * @Date 2025/10/29 20:34
 */
@Service
public class NursingElderServiceImpl extends ServiceImpl<NursingElderMapper, NursingElder> implements INursingElderService {

    @Autowired
    private NursingElderMapper nursingElderMapper;

    /**
     * 查询当前护理员负责的所有老人ID
     *
     * @param userId
     * @return
     */
    @Override
    public List<Long> getElderIdByUserId(Long userId) {
        return nursingElderMapper.getElderIdByUserId(userId);
    }
}